<template>
  <div class='wraper'>
    <swiper :options="swiperOption" v-if='swiperList.length>0'>
      <!-- slides -->
      <swiper-slide v-for='item in swiperList' :key='item.id'>
        <img class='swiper-img' :src="item.imgUrl" alt="">
      </swiper-slide>
      <!-- Optional controls -->
      <div class="swiper-pagination"  slot="pagination"></div>
    </swiper>
  </div>
</template>

<script>
export default {
  name: "HomeSwiper",
  props: ["swiperList"],
  data() {
    return {
      swiperOption: {
        pagination: ".swiper-pagination",
        loop: true
      }
    };
  },
  methods: {},
  components: {}
};
</script>

<style lang='stylus' scoped>
.wraper>>>.swiper-pagination-bullet
  background #fff
  opacity 1
.wraper>>>.swiper-pagination-bullet-active
  background red
.wraper
  width 100%
  height 0
  padding-bottom 31.25%
  overflow hidden
  backgrond #ccc
  .swiper-img
    width 100%
</style>
